<template>
  <div class="app">
    <div class="my">
        <div class="head">
            <h4>饿了么</h4>
            <div class="msg">
                <div class="phone">
                    <p>7udbh89cdj</p>
                    <p>130****9070</p>
                </div>
               <button>账户设置</button>
            </div>
        </div>
        <div class="banner">
            <img src="../../assets/1461.png" alt="">
        </div>
        <div class="tabber">
           <h4>常用工具</h4>
            <div class="tabs">
                <div class="tab" @click="$router.push('/address')">
                    <van-icon name="location-o" size="25" />
                    <p>我的地址</p>
                </div>
                <div class="tab">
                    <van-icon name="service-o" size="25" />
                    <p>我的客服</p>
                </div>
                <div class="tab" @click="handleClick">
                    <van-icon name="like-o" size="25" />
                    <p>店铺关注</p>
                </div>
                <div class="tab">
                    <van-icon name="star-o" size="25" />
                    <p>评价有礼</p>
                </div>
            </div>
            
        </div>

        <div class="list">
            <div class="dv" v-for="(item,index) in dv" :key="index" >
                <h4>{{item.title}}</h4>
                <p>{{item.msg}}</p>
                <img :src="item.pic" alt="">
                <button>{{item.button}}</button>
            </div>
        </div>
    </div>
  </div>
</template>

<script>
import pic from "../../assets/6.png"
export default {
    data(){
        return{
            tabs:["我的地址","我的客服","店铺关注","评价有礼"],
            dv:[
                {title:"邀请好友赚现金",msg:"最高得15元",pic:pic,button:"去邀请"},
                {title:"饿了么服务号",msg:"关注后及时接收系统通知",pic:pic,button:"去关注"},
                {title:"邀请好友赚现金",msg:"最高得15元",pic:pic,button:"去邀请"},
                {title:"饿了么服务号",msg:"关注后及时接收系统通知",pic:pic,button:"去关注"},
        ]
        }
    },
    methods:{
        handleClick(){
            this.$router.push('/collect')
        }
    }
}
</script>

<style scoped>
.my{
    width: 100%;
    height: 100%;
    position: fixed;
    background-color: #f5f5f5;
    box-sizing: border-box;
    padding: 10px;
}
.msg{
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.banner{
    box-sizing: border-box;
}
.banner img{
    width: 100%;
}
.phone{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
   
}
.phone p:first-child{
    font-size: 18px;
    font-weight: bold;
}
.phone p:last-child{
    color: gray;
    margin-top: 10px;
}
 button{
    width: 90px;
    height: 30px;
    border: 1px solid grey;
    border-radius: 15px;
}
.tabber{
    widows: 100%;
    box-sizing: border-box;
    padding: 10px;
    background-color: white;
    margin-top: 10px;
}
.tabs{
    display: flex;
    margin: 20px 0 10px 0;
    justify-content: space-around;
}
.tabs p{
    margin-top: 10px;
}
.tabber h4{
    margin: 10px 0;
}
.tabber .tab{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.list{
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
    line-height: 25px;
    justify-content: space-between;
}
.dv{
    width: 49%;
    display: flex;
    padding: 10px;
    box-sizing: border-box;
    flex-direction: column;
    margin-bottom: 10px;
    background-color: white;
}
.dv img{
    width: 40px;
    height: 40px;
    margin: auto;
    padding: 10px 0;
}
.dv button{
    background-color: white;
    margin: auto;
}
.dv p{
    color: gray;
    font-size: 12px;
}
</style>